﻿<!--                                                             -->
<!-- Copyright (C) Microsoft Corporation. All rights reserved.   -->
<!--                                                             -->


<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:presenters="clr-namespace:Microsoft.LibraryManagerDemo.Presenters">

    <!-- Represents the default view for the  LibraryTypePresenter presenter -->
    <DataTemplate DataType="{x:Type presenters:LibraryTypePresenter}">
        <ListBox ItemsSource="{Binding Path=FolderTemplates}"
                 IsSynchronizedWithCurrentItem="True"
                 ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                 ScrollViewer.VerticalScrollBarVisibility="Disabled"
                 Background="Transparent"
                 BorderBrush="Transparent"
                 Margin="4">

            <ListBox.ItemTemplate>
                <DataTemplate>
                    <DockPanel>
                        <TextBlock DockPanel.Dock="Bottom" Margin="4" Text="{Binding Type}"
                                   Foreground="{DynamicResource Brush_ToolBarForeground}" />
                        <Image Width="48" Height="48" Stretch="Fill" Source="{Binding Icon.BitmapSource}" />                        
                    </DockPanel>                    
                </DataTemplate>
            </ListBox.ItemTemplate>

            <ListBox.ItemsPanel>
                <ItemsPanelTemplate>
                    <WrapPanel HorizontalAlignment="Center" />
                </ItemsPanelTemplate>
            </ListBox.ItemsPanel>

        </ListBox>

    </DataTemplate>

</ResourceDictionary>